<div class="row">
	<div class="col-md-12">
		<table class="table table-bordered" style="margin-top: -1px;">
			<#if roles.canManageContract && roles.contractSub>
			<tr>
				<td colspan="8">
					<#if roles.contractService || roles.contractProfessional>
					<div class="btn btn-primary btn-xs export-sub-contract sub" data-id="${data.id}">
						<i class="icon-download-alt"></i>
						导出分包合同
					</div>
					</#if>
					<#if roles.contractTask>
					<div class="btn btn-success btn-xs export-sub-contract task" data-id="${data.id}">
						<i class="icon-download-alt"></i>
						导出任务书
					</div>
					</#if>
					<#if roles.contractMaterial>
					<div class="btn btn-danger btn-xs export-sub-contract material" data-id="${data.id}">
						<i class="icon-download-alt"></i>
						导出材料合同
					</div>
					</#if>
				</td>
			</tr>
			</#if>
			<tr>
				<#if (roles.canCreateSubContract) && 'START'==data.status>
				<th width="35"></th>
				</#if>
				<th class="text-center" width="45">状态</th>
				<th class="text-center">名称</th>
				<th class="text-center">承建单位（部门）</th>
				<th class="text-center">合同金额</th>
				<th class="text-center">结算金额</th>
				<th class="text-center" width="195">编号</th>
				<th class="text-center" width="195">工期</th>
			</tr>
			<#if data.subContracts??> <#list data.subContracts as sc>
			<tr>
				<#if (roles.canCreateSubContract) && 'START'==data.status>
				<td class="text-center">
					<#if 'START'==sc.status && sc.isThisCreator(Session['login_user'].id)>
					<a href="javascript:;" class="icon-remove text-danger delete-contract" data-id="${sc.id}"></a>
					</#if>
				</td>
				</#if>
				<td class="text-center">${sc.status.value}</td>
				<td class="text-center">
					<span class="text-danger">[${sc.type.value}]</span>
					<a href="${request.contextPath}/sub-contract/view/${sc.id}">${sc.name}</a>
				</td>
				<td class="text-center">${sc.companyB}</td>
				<td class="text-center">${sc.priceString}</td>
				<td class="text-center">${(sc.clearingPrice?string('currency'))!'-'}</td>
				<td class="text-center">${sc.no}</td>
				<td class="text-center">${(sc.contractStart?string('yyyy-MM-dd'))!'-'} 至 ${(sc.contractEnd?string('yyyy-MM-dd'))!'-'}</td>
			</tr>
			</#list> </#if>
		</table>
	</div>
</div>